package com.work.demo.file;

import java.lang.instrument.Instrumentation;

public class ObjectShallowSize {
	private static Instrumentation inst;

	public static void premain(String agentArgs, Instrumentation instP) {
		inst = instP;
	}

	public static long sizeOf(Object obj) {
		return inst.getObjectSize(obj);
	}

	public static void main(String[] args) {
		System.out.println(ObjectShallowSize.sizeOf("sdfadsf"));
	}
}